package cn.sytton.taffecloud.serivce.auth.properties.auth;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * yml配置类：auth
 *
 * @author skyrock
 */
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "auth")
@EnableConfigurationProperties(AuthProperties.class)
public class AuthProperties {
    /**
     * 图片验证码配置
     */
    @NestedConfigurationProperty
    private CaptchaProperties captcha = new CaptchaProperties();

    /**
     * 短信验证码配置
     */
    @NestedConfigurationProperty
    private SmsProperties sms = new SmsProperties();

    public CaptchaProperties getCaptcha() {
        return captcha;
    }

    public void setCaptcha(CaptchaProperties captcha) {
        this.captcha = captcha;
    }

    public SmsProperties getSms() {
        return sms;
    }

    public void setSms(SmsProperties sms) {
        this.sms = sms;
    }
}
